package com.qiguliuxing.dts.core.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 从配置文件读取微信支付的相关配置
 */
//
//dts:
//		# 开发者应该设置成自己的wx相关信息
//		wx:
//		app-id: wx4901b319ace4f88a
//		app-secret: 45bae4a701e7ec35bca38fdedxxxxxx
//		mch-id: 1538666666
//		mch-key: 1538xxxxxx-1538xxxxxx-1538xxxxxx
//		notify-url: https://test.dtsshop.com/demo/order/dtsNotify
//		# 商户证书文件路径
//		# 请参考“商户证书”一节 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_3
//		key-path: xxxxx

@Configuration

//@ConfigurationProperties 的 POJO类的命名比较严格,因为它必须和prefix的后缀名要一致, 不然值会绑定不上,
// 特殊的后缀名是“driver-class-name”这种带横杠的情况,在POJO里面的命名规则是 下划线转驼峰 就可以绑定成功，所以就是 “driverClassName”
@ConfigurationProperties(prefix = "dts.wx")
public class WxProperties {

	private String appId;

	private String appSecret;

	private String mchId;

	private String mchKey;

	private String notifyUrl;

	private String keyPath;

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}

	public String getMchKey() {
		return mchKey;
	}

	public void setMchKey(String mchKey) {
		this.mchKey = mchKey;
	}

	public String getAppId() {
		return this.appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAppSecret() {
		return appSecret;
	}

	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}

	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}

	public String getKeyPath() {
		return keyPath;
	}

	public void setKeyPath(String keyPath) {
		this.keyPath = keyPath;
	}
}
